package com.gdwstudy.cpunumber;

/**
 * @author 关道伟
 * @version 1.0
 */
public class CpuNumber {
    public static void main(String[] args) {
        Runtime runtime = Runtime.getRuntime();
        //获取当前电脑的cpu数目
        int cpuNum = runtime.availableProcessors();
        System.out.println("当前有cpu个数="+cpuNum);
    }
}
